function validateSubmit() {
    // Check if user selects one or more files
    var hasFile = false;
    var obj;
    
    for (var ii = 1; ii <= 5; ii ++) {
        obj = document.getElementById("file" + ii);
        
        if (obj != null && obj.value != null && obj.value != "") {
            hasFile = true;
            break;
        }
    }
    
    if (!hasFile) {
        alert("Please select at least one file.");
    }
    
    return hasFile;
}